/**
 * Copyright 1993-2018 Agree Tech.
 * All rights reserved.
 */
package com.fjl.exception;

import com.fjl.result.AbpmServiceResults;

/**
 *
 * @author PuYun pu.yun@agree.com.cn
 */
public class AbpmServiceException extends RuntimeException
{

    /**
     * 
     */
    private static final long serialVersionUID = 7018444868386335508L;

    private String code;
    
    private String detail;
    /**
     * 
     * @param callResult Abpm调用结果
     */
    public AbpmServiceException(AbpmServiceResults callResult)
    {
        super(callResult.getMessage());
        this.code = callResult.getCode();
    }
    
    public AbpmServiceException(AbpmServiceResults callResult, String detail)
    {
        this(callResult);
        this.detail = detail;
    }

    public AbpmServiceException(String message, Exception e) {
        this.code=message;
        this.detail=message;
    }

    /**
     * @return the code
     */
    public String getCode()
    {
        return code;
    }

    public String getDetail()
    {
        return detail;
    }
}
